package com.cinco.server.mapper;

import com.cinco.server.pojo.Department;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cinco.server.pojo.Result;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author cinco
 * @since 2022-01-11
 */
public interface DepartmentMapper extends BaseMapper<Department> {
    /**
     * 获取所有部门
     * @return
     * @param parentId
     */
    List<Department> getAllDepartments(Integer parentId);

    /**
     * 添加部门信息
     * @param dept
     * @return
     */
    Result addDepartment(Department dept);

    /**
     * 删除部门信息
     * @param dep
     * @return
     */
    Result delDepartment(Department dep);
}
